package com.zhsq.zlc.service.authority;

import java.util.List;

import com.zhsq.zlc.entity.AuthorityEntity;
import com.zhsq.zlc.entity.AuthorityTreeEntity;
import com.zhsq.zlc.entity.UserAuthorityEntity;

public interface AuthorityService {
	
	List<AuthorityEntity> list(AuthorityEntity entity) throws Exception;

	int count(AuthorityEntity entity) throws Exception;

	AuthorityEntity getAuthorityById(AuthorityEntity entity) throws Exception;

	void add(AuthorityEntity entity) throws Exception;
	
	void edit(AuthorityEntity entity) throws Exception;
	
	void delete(int id) throws Exception;
	
	List<AuthorityTreeEntity> getAuthorityTree() throws Exception;

	AuthorityEntity getParentAuthorityById(Integer roleId) throws Exception;
	
	List<AuthorityEntity> getAuthoritysByParentId(Integer parentId) throws Exception;
	
	List<AuthorityEntity> getAuthorityByRoleId(Integer roleId) throws Exception;

	List<UserAuthorityEntity> getAuthorityTreeByRoleId(Integer roleId) throws Exception;

	void delAuthorityByRole(Integer roleId) throws Exception;

	void batchInsertRoleAuthority(Integer roleId, String authorityIds) throws Exception;
}
